Skip to content

Drop Python 3.11, declare and test up to Python 3.14 - #686

Merged
MridulS merged 10 commits into
mainfrom
drop_py311
Aug 20, 2026
Merged

Drop Python 3.11, declare and test up to Python 3.14#686
MridulS merged 10 commits into
mainfrom
drop_py311

Conversation

@MridulS

@MridulS MridulS commented Jul 31, 2026

Copy link
Copy Markdown
Member
  • Require Python >= 3.12 in all packages (pixi pin, requires-python, classifiers, copier answers, workflow pins) and re-lock
  • Declare Python 3.14 support in classifiers and copier max_python
  • Bump minimum scipp to 26.7.0
  • Nightly: run latest-dependencies on 3.12/3.13/3.14 and add a free-threaded 3.14t job; essnmx is excluded (bitshuffle re-enables the GIL) as is essdiffraction (numba aborts in dask worker threads)
  • Unify uv at 0.12.0 across nightly jobs

- Require Python >= 3.12 in all packages (pixi pin, requires-python,
  classifiers, copier answers, workflow pins) and re-lock
- Declare Python 3.14 support in classifiers and copier max_python
- Bump minimum scipp to 26.7.0
- Nightly: run latest-dependencies on 3.12/3.13/3.14 and add a
  free-threaded 3.14t job; essnmx is excluded (bitshuffle re-enables
  the GIL) as is essdiffraction (numba aborts in dask worker threads)
- Unify uv at 0.12.0 across nightly jobs
@github-actions github-actions Bot added CI essdiffraction Issues for essdiffraction. essimaging Issues for essimaging. essnmx Issues for essnmx. essreduce Issues for essreduce. essreflectometry Issues for essreflectometry. esssans Issues for esssans. essspectroscopy Issues for essspectroscopy. labels Jul 31, 2026
MridulS and others added 4 commits August 6, 2026 15:10
With requires-python >= 3.12 ruff enforces the PEP 695 type keyword for
TypeAlias annotations. These aliases cannot use the type keyword: sciline
needs the concrete generic alias at runtime, and PEP 695 aliases are
lazily evaluated TypeAliasType objects. Use plain assignments instead,
which ruff accepts and which keep the runtime objects unchanged.

Also drop the invalid bare-prefix noqa directive in essspectroscopy;
it suppressed nothing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Re-ran copier update for each package (pinned to its recorded template
commit, with min_python=3.12 max_python=3.14) instead of relying on the
manual edits. Copier's output confirmed the .copier-answers.yml contents
byte-for-byte and caught one thing the manual edit missed: the tox
environment in docs/developer/getting-started.md still said py311.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MridulS
MridulS enabled auto-merge August 6, 2026 14:03
@@ -2,8 +2,8 @@
_commit: 024a41b

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I missed something but we do we still have copier answers? I thought we were not using copier in the monorepo?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still have copier.yml lying around, I am happy to remove copier.yml files here if we have fully decided on not using copier in the monorepo. I am not sure if we had a final decision here? cc @YooSunYoung

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We kept it at the beginning in case we want to use copier template to, e.g. update python version using copier template,,, but if I'm the only one who's willing to maintain the copier template we should just remove them... I don't want to be too important.

In Short: Let's remove them...?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but in a separate PR, please.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YooSunYoung I'm not saying the copier template is not important. It's still used in plenty of other repositories. I just thought that they no longer serve a purpose here because I don't think it can work in subdirectories of a repo (e.g. for the docs config), and all the CI setup and dependencies is now managed centrally at the root of the monorepo.


```sh
tox -e py311
tox -e py312

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This documentation seems out of date? We no longer use tox. Left over from copier?

Comment thread packages/essreduce/pyproject.toml Outdated
"graphviz>=0.20",
"sciline>=25.11.0",
"scipp>=26.3.1",
"scipp>=26.7.0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the reason for the scipp version bump?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't actually remember, I think there was some local failure with py314 scipp build but I can't reproduce the failure anymore. I'll revert.

Comment thread .github/workflows/nightly.yml Outdated
fail-fast: false
matrix:
# Excluded packages that do not work on free-threaded Python yet:
# - essnmx: importing bitshuffle re-enables the GIL, which

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you suppress that warning specifically in the project? I think that is less likely to cause issues down the line than silently not testing the package.

Comment thread .github/workflows/nightly.yml Outdated
# Excluded packages that do not work on free-threaded Python yet:
# - essnmx: importing bitshuffle re-enables the GIL, which
# filterwarnings = error escalates to a collection error.
# - essdiffraction: numba-jitted code aborts the interpreter when run

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will #707 fix this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually yes, it should

@MridulS

MridulS commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

Anymore blockers here?

@jl-wynen jl-wynen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Do we need to wait for #707 or can we merge this without degradations?

@MridulS

MridulS commented Aug 20, 2026

Copy link
Copy Markdown
Member Author

I think we can merge this for now, the #707 test is anyway a flaky failure.

@MridulS
MridulS added this pull request to the merge queue Aug 20, 2026
Merged via the queue into main with commit 769db6d Aug 20, 2026
45 of 48 checks passed
@MridulS
MridulS deleted the drop_py311 branch August 20, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI essdiffraction Issues for essdiffraction. essimaging Issues for essimaging. essnmx Issues for essnmx. essreduce Issues for essreduce. essreflectometry Issues for essreflectometry. esssans Issues for esssans. essspectroscopy Issues for essspectroscopy.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants